package com.tansuo365.test1.service.otherservice.impl;

import com.tansuo365.test1.bean.otherbean.ShengouDetails;
import com.tansuo365.test1.mapper.othermapper.ShengouDetailsCacheMapper;
import com.tansuo365.test1.service.otherservice.ShengouDetailsCacheService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ShengouDetailsCacheServiceImpl implements ShengouDetailsCacheService {

    @Resource
    private ShengouDetailsCacheMapper shengouDetailsCacheMapper ;

    @Override
    public List<ShengouDetails> selectAll() {
        return shengouDetailsCacheMapper.selectAll();
    }

    @Override
    public int delectAll() {
        return shengouDetailsCacheMapper.deleteAll();
    }

    @Override
    public  void insertAll(List<ShengouDetails> shengouDetailsList) {
        shengouDetailsList.forEach(shengouDetails->shengouDetailsCacheMapper.insertSelective(shengouDetails));

    }
}
